import {get, post} from "@/axios/http.js";
import {BASEURL} from '@/api/baseUrl.js';

//发布岗位
export const searchRoleList = () => {
    return get(BASEURL + "/role/list");
}

//账号注册
export const registerAccount = (param) => {
    return post(BASEURL + "/user/register", param);
}

//登录
export const userLogin = (param) => {
    return post(BASEURL + "/user/login", param);
}
//修改密码
export const updatePassword = (param) => {
    return post(BASEURL + "/user/updatePassword?" + param);
}

//查询用户信息及角色
export const getUserRoleInfo = () => {
    return get(BASEURL + "/user/getUserRoleInfo");
}

//新增角色
export const addRole = (param) => {
    return post(BASEURL + "/role/add", param);
}

//修改角色
export const updateRole = (param) => {
    return post(BASEURL + "/role/update", param);
}

//删除角色
export const deleteRole = (param) => {
    return post(BASEURL + "/role/delete", param);
}

//查询所有角色
export const allRoleList = (param) => {
    return post(BASEURL + "/role/allList",param);
}

//通过角色关联菜单
export const relevancyMenu = (param) => {
    return post(BASEURL + "/role/relevancy/menu",param);
}

